﻿<UserControl x:Class="Aeon.Presentation.Debugger.DisassemblyView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:emu="clr-namespace:Aeon.Emulator;assembly=Aeon.Emulator"
             xmlns:debug="clr-namespace:Aeon.Presentation.Debugger"
             mc:Ignorable="d" Name="root"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="InstructionTemplates.xaml" />
                <ResourceDictionary Source="ListBoxTemplates.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <Style x:Key="loggedInstructionStyle" TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource listBoxItemStyle}">
                <Setter Property="Background" Value="Gainsboro" />
            </Style>
            <debug:InstructionStyleSelector x:Key="styleSelector" />
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <ListBox Name="listBox" ItemContainerStyleSelector="{StaticResource styleSelector}" ItemsSource="{Binding InstructionsSource, ElementName=root}"
                 FontFamily="Courier New" ItemTemplateSelector="{StaticResource instructionTemplateSelector}" />
    </Grid>
</UserControl>
